package org.one.afternoon.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.one.afternoon.domain.Client;
import org.one.afternoon.forest.FrontendClient;
import org.one.afternoon.mapper.ClientMapper;
import org.one.afternoon.service.ClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
@Slf4j
public class ClientServiceImpl extends ServiceImpl<ClientMapper, Client> implements ClientService {
    @Autowired
    private FrontendClient frontendClient;

    public String isHealth(String ip) {
        log.info(frontendClient.isHealth(ip));
        if (frontendClient.isHealth(ip).equals("OK")) {
            return "OK";
        }
        return null;
    }

    @Override
    public String getCustomersSign(String ip) {
        return frontendClient.getCustomersSign(ip);
    }
}
